{include file="public/_meta" /}

<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	系统管理
	<span class="c-gray en">&gt;</span>
	基本设置
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" onclick="ooo()" title="清楚缓存" ><i class="Hui-iconfont">&#xe706;</i></a>&nbsp;&nbsp;&nbsp;&nbsp;
</nav>
<div class="page-container">
	<form class="form form-horizontal" id="form-article-add">
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl">
				<span>基本设置</span>
				<!-- <span>对公账户</span> -->
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>网站状态：</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<div class="radio-box">
							<input name="status" type="radio" value="1" id="">
							<label for="sex-1">在线</label>
						</div>
						<div class="radio-box">
							<input type="radio" value="0" id="" name="status">
							<label for="sex-2" class="c-red">关闭</label>
						</div>
					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						收货地址：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="addr_id"  value="{:cache('setting')['addr_id']}" class="input-text" style="width:50%">
					</div>
				</div>
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						银行卡号：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="bank_num"  value="{:cache('setting')['bank_num']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						开户银行：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="bank_name"  value="{:cache('setting')['bank_name']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						客服电话：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="customer_tel"  value="{:cache('setting')['customer_tel']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						客服微信：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="customer_WeChat"  value="{:cache('setting')['customer_WeChat']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						客服QQ：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="customer_qq"  value="{:cache('setting')['customer_qq']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
				<!-- <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						开户行地址：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="bank_addr"  value="{:cache('setting')['bank_addr']}" class="input-text" style="width:20%">
					</div>
				</div> -->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						提现手续费比例：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="fee"  value="{:cache('setting')['fee']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						提现最低额度：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="lowest"  value="{:cache('setting')['lowest']}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
				<!-- <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						综合费用比例：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="sb"  value="{:cache('setting')['sb']}" class="input-text" style="width:20%">
					</div>
				</div> -->
				<!-- <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						直推奖励比例：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="award1"  value="{:cache('setting')['award1']}" class="input-text" style="width:20%">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						二代推荐奖励比例：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="award2"  value="{:cache('setting')['award2']}" class="input-text" style="width:20%">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						三代到九代推荐奖励比例：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" name="award1"  value="{:cache('setting')['award1']}" class="input-text" style="width:20%">
					</div>
				</div> -->
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onclick="return saveConfig();" class="btn btn-primary radius" type="submit"><i clsass="Hui-iconfont">&#xe632;</i> 保存</button>
<!--				<button class="btn btn-default radius rst" type="reset">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>-->
			</div>
		</div>
	</form>
</div>
{include file="public/_footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$('.form input[name="status"][value='+"{:cache('setting')['status']}"+']').attr("checked",true);

$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#tab-system").Huitab({
		index:0
	});
});
// /setting/saveinfo
function saveConfig(){
	$.post("{:url('setting/index')}",$('.form').serialize()).success(function(data){
		layer.msg(data.msg);
		if(!data.code){
			$('.rst').click();
		}
	});
	return false;
}
function ooo(){
	$.post("{:url('every/clear')}").success(function(data){
		layer.msg('清除成功');
	});
	return false;
}
$("#file_upload").change(function() {
        //提交
        var data = new FormData();
        // console.log($(this)[0].files[0]);
        data.append('img',$(this)[0].files[0]);
        $.ajax({
            url: '{:url("tupian")}',
            type: 'POST',
            data: data,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
            	if(data.code){
            		$('#background').val(data.data);
                	$('.preview').attr('src', data.data);
            	}else{
            		layer.msg(data.msg);
            	}
            	
            },
            error: function() {
                layer.msg('上传出错');
            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
